<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <head>
        <title>Insert title here</title>
        <meta charset="UTF-8">
        <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
        <title>Hello, Bootstrap Table!</title>
        <meta charset="UTF-8">
        <title>Title</title>
        <script th:src="@{/js/jquery-3.2.1.min.js}"></script>
        <!-- 最新 Bootstrap4 核心 CSS 文件 -->
        <link href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

        <!--时间控件-->
        <link href="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css"
              rel="stylesheet">
        <!-- bootstrap.bundle.min.js 用于弹窗、提示、下拉菜单，包含了 popper.min.js -->
        <script rel="stylesheet" th:src="@{/js/bootstrap.bundle.min.js} "></script>
        <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
        <script rel="stylesheet" th:src="@{/js/bootstrap.min.js}"></script>
        <!-- BootStrapValidator -->
        <link href="https://cdn.bootcss.com/jquery.bootstrapvalidator/0.5.3/css/bootstrapValidator.min.css"
              rel="stylesheet">
        <script src="https://cdn.bootcss.com/jquery.bootstrapvalidator/0.5.3/js/bootstrapValidator.min.js"
                type="text/javascript"></script>
        <!--时间控件-->
        <script th:src="@{/daterangepicker/moment.js}"></script>
        <script src="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
        <script th:src="@{/js/functions.js}"></script>

    </head>
</head>
<body>
<div th:include="../templates/admin/top::headtop"></div>
<div class="container" id="content">
    <div class="row">
        <div th:include="../templates/admin/menu::headmenu"></div>
        <div class="col-md-10">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="row">
                        <h1 class="col-md-5">放映厅管理</h1>
                        <form class="form-inline" id="searchForm" role="form" th:action="@{/admin/findScreens}"
                              th:method="post">
                            <div class="form-group col-md-2 offset-1">
                                <input class="form-control input-sm" id="screens_name" name="screens_name" placeholder="放映厅名"
                                       th:value="${param.screens_name}"
                                       type="text"/>
                            </div>
                            <div class="form-group col-md-2">
                                <select class="form-control input-sm" id="film_type1" name="screens_type">
                                    <option value="">---不限制放映厅类别---</option>
                                    <option th:selected="${#strings.trim(param.screens_type)=='0'}" value="0">小型</option>
                                    <option th:selected="${#strings.trim(param.screens_type)=='1'}" value="1">中型</option>
                                    <option th:selected="${#strings.trim(param.screens_type)=='2'}" value="2">中型3D</option>
                                    <option th:selected="${#strings.trim(param.screens_type)=='3'}" value="3">大型</option>
                                    <option th:selected="${#strings.trim(param.screens_type)=='4'}" value="4">大型3D</option>
                                </select>
                            </div>
                            <div class="form-group col-md-1">
                                <button class="btn btn-primary btn-sm" type="submit">搜索</button>
                            </div>
                        </form>
                        <div class="form-group col-md-1">
                            <button class="btn btn-primary btn-sm" onclick="registerMadel()" type="submit">新增放映厅</button>
                        </div>
                    </div>
                </div>
                <form class="form" id="regForm" th:method="post" th:action="@{/admin/updateScreens}">
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="film_name">放映厅名</label>
                        </div>
                        <input type="hidden" name="screens_id" th:value="${ScreensList.screens_id}">
                        <div class="col-md-6">
                            <input type="text" id="screens_name1" name="screens_name"
                                   class="form-control input-sm" placeholder="放映厅名字" required  th:value="${ScreensList.screens_name}"/><span
                                id="result"></span>
                        </div>
                    </div>

                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="seating">坐位数</label>
                        </div>
                        <div class="col-md-6">
                            <input type="text" id="seating" name="seating"
                                   class="form-control input-sm" placeholder="seating" th:value="${ScreensList.seating}"/>
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-md-2">
                            <label for="screens_type">放映厅类型</label>
                        </div>
                        <div class="col-md-6">
                            <td>
                                <select class="form-control input-sm" id="screens_type" name="screens_type">
                                    <option th:selected="${#strings.trim(ScreensList.screens_type)=='0'}" value="0">小型</option>
                                    <option th:selected="${#strings.trim(ScreensList.screens_type)=='1'}" value="1">中型</option>
                                    <option th:selected="${#strings.trim(ScreensList.screens_type)=='2'}" value="2">中型3D</option>
                                    <option th:selected="${#strings.trim(ScreensList.screens_type)=='3'}" value="3">大型</option>
                                    <option th:selected="${#strings.trim(ScreensList.screens_type)=='4'}" value="4">大型3D</option>
                                </select>
                            </td>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <div class="form-group">
                            <div class="text-center">
                                <button class="btn btn-primary" type="submit">确定</button>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <button class="btn btn-secondary" type="reset">重置</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>